home *** CD-ROM | disk | FTP | other *** search
/ CICA 1995 August / CICA - The Ultimate Collection of Shareware for Windows (Disc 2) (August 1995).iso / disc2 / demo / gcp_24.exe / DIALUPDL.FR_ / DIALUPDL.FR
Text File  |  1994-04-26  |  5KB  |  151 lines

  1. VERSION 2.00
  2. Begin Form DialUpDlg 
  3.    BorderStyle     =   3  'Fixed Double
  4.    Caption         =   "Dial-Up Host"
  5.    ClientHeight    =   2010
  6.    ClientLeft      =   2355
  7.    ClientTop       =   2325
  8.    ClientWidth     =   5055
  9.    Height          =   2415
  10.    Left            =   2295
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   2010
  15.    ScaleWidth      =   5055
  16.    Top             =   1980
  17.    Width           =   5175
  18.    Begin CommandButton Command4 
  19.       Caption         =   "Terminal Settings..."
  20.       Height          =   375
  21.       Left            =   2520
  22.       TabIndex        =   7
  23.       Top             =   1380
  24.       Width           =   1995
  25.    End
  26.    Begin CommandButton Command3 
  27.       Cancel          =   -1  'True
  28.       Caption         =   "Cancel"
  29.       Height          =   375
  30.       Left            =   3600
  31.       TabIndex        =   6
  32.       Top             =   840
  33.       Width           =   1095
  34.    End
  35.    Begin CommandButton Command2 
  36.       Caption         =   "Comm Settings..."
  37.       Height          =   375
  38.       Left            =   360
  39.       TabIndex        =   5
  40.       Top             =   1380
  41.       Width           =   1935
  42.    End
  43.    Begin CommandButton Command1 
  44.       Caption         =   "OK"
  45.       Default         =   -1  'True
  46.       Height          =   375
  47.       Left            =   3600
  48.       TabIndex        =   4
  49.       Top             =   240
  50.       Width           =   1095
  51.    End
  52.    Begin TextBox Phone 
  53.       Height          =   375
  54.       Left            =   720
  55.       TabIndex        =   3
  56.       Top             =   840
  57.       Width           =   2655
  58.    End
  59.    Begin TextBox Text1 
  60.       Height          =   375
  61.       Left            =   720
  62.       TabIndex        =   1
  63.       Top             =   240
  64.       Width           =   2655
  65.    End
  66.    Begin Label Label1 
  67.       Caption         =   "Phone"
  68.       Height          =   255
  69.       Left            =   120
  70.       TabIndex        =   2
  71.       Top             =   960
  72.       Width           =   615
  73.    End
  74.    Begin Label Name 
  75.       Caption         =   "Name"
  76.       Height          =   255
  77.       Left            =   120
  78.       TabIndex        =   0
  79.       Top             =   360
  80.       Width           =   615
  81.    End
  82. End
  83.  
  84. Sub Command1_Click ()
  85.     frmMDI.ActiveForm.VT1.Protocol = 0 'none/dialup
  86.     DialUpDlg.Hide
  87.     Me.Caption = FState(frmMDI.ActiveForm.Tag).Session & " - connecting..."
  88.     Tmp$ = Text1
  89.     FState(FIndex).LastDialUp = Tmp$
  90.     suc = WritePrivateProfileString("Modem", "LastDialUp", Tmp$, IniFile)
  91.     Tmp$ = Phone
  92.     FState(FIndex).Phone = Tmp$
  93.     suc = WritePrivateProfileString("Modem", "Phone", Tmp$, IniFile)
  94.     Tmp$ = FState(FIndex).Dial
  95.     suc = WritePrivateProfileString("Modem", "Dial", Tmp$, IniFile)
  96.     Tmp$ = FState(FIndex).ModemInitString
  97.     suc = WritePrivateProfileString("Modem", "ModemInitString", Tmp$, IniFile)
  98.     frmMDI.ActiveForm.VT1.OpenComm = True
  99. End Sub
  100.  
  101. Sub Command2_Click ()
  102.     CenterForm frmMDI, ConfigScrn
  103.     ConfigScrn.Show 1 'modal
  104. End Sub
  105.  
  106. Sub Command3_Click ()
  107.     frmMDI.ActiveForm.VT1.Protocol = 0
  108.     Unload DialUpDlg
  109. End Sub
  110.  
  111. Sub Command4_Click ()
  112.     CenterForm frmMDI, Emulation
  113.     Emulation.Show 1 'modal
  114. End Sub
  115.  
  116. Sub Form_Activate ()
  117. Dim Tmp As String * 80
  118.     If FState(frmMDI.ActiveForm.Tag).NewFlag Then
  119.         Text1.Text = NewSession.Text1.Text
  120.         suc = GetPrivateProfileString("Modem", "Phone", Phone, Tmp, 80, IniFile)
  121.         Temp = Left$(Tmp, InStr(Tmp, Chr$(0)) - 1)
  122.         Phone.Text = Temp
  123.         suc = GetPrivateProfileString("Modem", "Dial", FState(frmMDI.ActiveForm.Tag).Dial, Tmp, 80, IniFile)
  124.         Temp = Left$(Tmp, InStr(Tmp, Chr$(0)) - 1)
  125.         FState(frmMDI.ActiveForm.Tag).Dial = Temp
  126.         suc = GetPrivateProfileString("Modem", "ModemInitString", FState(frmMDI.ActiveForm.Tag).ModemInitString, Tmp, 80, IniFile)
  127.         Temp = Left$(Tmp, InStr(Tmp, Chr$(0)) - 1)
  128.         FState(frmMDI.ActiveForm.Tag).ModemInitString = Temp
  129.         If Temp = "" Then
  130.             Phone.Enabled = False
  131.         Else
  132.             Phone.SetFocus
  133.         End If
  134.     Else  'otherwise get current values for number and name of last host called
  135.         If FState(frmMDI.ActiveForm.Tag).ModemInitString = "" Then
  136.             Phone.Enabled = False
  137.         Else
  138.             Phone.Enabled = True
  139.             Phone.Text = FState(frmMDI.ActiveForm.Tag).Phone
  140.             Text1.Text = FState(frmMDI.ActiveForm.Tag).LastDialUp
  141.         End If
  142.     End If
  143.  
  144. End Sub
  145.  
  146. Sub Phone_GotFocus ()
  147.     Phone.SelStart = 0
  148.     Phone.SelLength = Len(Phone.Text)
  149. End Sub
  150.  
  151.